import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PassportModule } from '@nestjs/passport';
import { LocalStorage } from './strategy/local.strategy';
import { jwtModule } from './jwt.module';
import { ConfigModule } from '@nestjs/config';
import { JwtStrategy } from './strategy/jwt.strategy';
import { UserEntity } from '@/entity/user.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature([UserEntity]),
    PassportModule,
    jwtModule,
    ConfigModule,
  ],
  providers: [AuthService, LocalStorage, JwtStrategy],
  controllers: [AuthController],
  exports: [jwtModule],
})
export class AuthModule {}
